package com.kingmed.kmss.admin.modules.sys.model;

import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * <p>
 * 系统数据字典表
 * </p>
 *
 * @author WYL
 * @since 2022-12-14
 */
@Getter
@Setter
@TableName("sys_data_dict")
@ApiModel(value = "SysDataDict对象", description = "系统数据字典表")
public class SysDataDict implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;

    @ApiModelProperty("数据字典名称")
    @NotEmpty
    private String dictName;

    @ApiModelProperty("数据字典代码")
    @NotEmpty
    private String dictCode;

    /**
     * 字典键值
     */
    @ExcelProperty(value = "数据字典键值")
    @NotBlank(message = "字典键值不能为空")
    @Size(min = 0, max = 100, message = "字典键值长度不能超过100个字符")
    @ApiModelProperty("数据字典键")
    @NotEmpty
    private String dictKey;

    @ApiModelProperty("数据字典值")
    @NotEmpty
    private String dictValue;

    @ApiModelProperty("是否默认展示")
    private Boolean isDefault;

    @ApiModelProperty("字典排序")
    private int dictSort;

}
